package com.study.springboot_25_mqkafka.listener;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/5/13 8:53 下午
 */

@Component
public class MessageListener {


    @KafkaListener(topics = {"test"}, groupId = "my_group2")
    public void onMessage(ConsumerRecord<String, String> record) {
        System.out.println("已经完成短信业务的发送任务-kafka ：" + record.value());
    }
}
